import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
// delon
import { AlainThemeModule } from '@delon/theme';
import { DelonABCModule } from '@delon/abc';
import { DelonACLModule } from '@delon/acl';
import { DelonFormModule } from '@delon/form';

// region: third libs
import { NgZorroAntdModule } from 'ng-zorro-antd';
import { CountdownModule } from 'ngx-countdown';
import { TransformModule } from '@shared/pipe/transform.module';
import { MyModalHelper } from '@core/my-modal.helper';
import { SimpleEditorComponent } from '@shared/simple-editor/simple-editor.component';
import { PicViewerComponent } from '@shared/pic-viewer/pic-viewer.component';
import { LeaveConfirmComponent } from '@shared/leave-confirm/leave-confirm.component';
import { FullScreenEditorComponent } from '@shared/full-screen-editor/full-screen-editor.component';
import { ConfirmComponent } from './confirm/confirm.component';
import { AgentEditComponent } from '../routes/agent/agent-list/agent-edit/agent-edit.component';
import { BaseFormComponent } from '@shared/base-form/base-form.component';
import { BaseInputComponent } from '@shared/base-form/base-input/base-input.component';
import { BaseNumberInputComponent } from '@shared/base-form/base-input/base-number-input/base-number-input.component';
import { BaseStringInputComponent } from '@shared/base-form/base-input/base-string-input/base-string-input.component';
import { BaseArrayInputComponent } from '@shared/base-form/base-input/base-array-input/base-array-input.component';
import { BaseJsonInputComponent } from '@shared/base-form/base-input/base-json-input/base-json-input.component';
import { AgentRechargeComponent } from '../routes/agent/agent-list/agent-recharge/agent-recharge.component';
import { BaseImgInputComponent } from '@shared/base-form/base-input/base-img-input/base-img-input.component';
import { PicViewerModalComponent } from '@shared/pic-viewer-modal/pic-viewer-modal.component';
import { BaseDateInputComponent } from '@shared/base-form/base-input/base-date-input/base-date-input.component';
import { BaseJsonArrayInputComponent } from '@shared/base-form/base-input/base-json-array-input/base-json-array-input.component';
import { CakeOrderViewComponent } from '../routes/mid-autumn/cake-order/order-view/cake-order-view.component';
import { DragsortinstructDirective } from '@shared/directive/Dragsortinstruct.directive';
import { ProfitWithdrawListComponent } from '../routes/profit-withdraw/profit-withdraw-list/profit-withdraw-list.component';
import { ProfitWithdrawEditComponent } from '../routes/profit-withdraw/profit-withdraw-edit/profit-withdraw-edit.component';
import { CompanyIntegralViewComponent } from '../routes/company/integral-list/integral-view/integral-view.component';
import { FansProfitsComponent } from '../routes/market-fans/market-fans-business-detail/fans-profits/fans-profits.component';
import { InteractionModalComponent } from '@shared/interaction-modal/interaction-modal.component';
import { OtcConvertListComponent } from '../routes/otc-convert/otc-convert-list/otc-convert-list.component';
import { OtcShopListComponent } from '../routes/otc-shop/otc-shop-list/otc-shop-list.component';
import { OtcCreditRecordComponent } from '../routes/otc-credit/otc-credit-record/otc-credit-record.component';
import { OtcCreditViewComponent } from '../routes/otc-credit/otc-credit-record/otc-credit-view/otc-credit-view.component';
import { OtcBillEditComponent } from '../routes/otc-cus/otc-bill-list/otc-bill-edit/otc-bill-edit.component';
import { OtcConvertViewComponent } from '../routes/otc-convert/otc-convert-list/otc-convert-view/otc-convert-view.component';
import { OtcShopEditComponent } from '../routes/otc-shop/otc-shop-edit/otc-shop-edit.component';
import { OtcCusViewComponent } from '../routes/otc-cus/otc-cus-list/otc-cus-view/otc-cus-view.component';
import { OtcCusShopComponent } from '../routes/otc-cus/otc-cus-list/otc-cus-view/otc-cus-shop/otc-cus-shop.component';
import { OtcCusShopRoleComponent } from '../routes/otc-cus/otc-cus-shop-role/otc-cus-shop-role.component';
import { OrderViewComponent } from '../routes/order/order-view/order-view.component';
import { OrderListComponent } from '../routes/order/order-list/order-list.component';
import { OtcShopBrandComponent } from '../routes/otc-shop/otc-shop-brand/otc-shop-brand.component';
import { OtcShopOtcShopBrandEditComponent } from '../routes/otc-shop/otc-shop-brand/otc-shop-brand-edit/otc-shop-brand-edit.component';
import { OtcShopShopCreditRuleComponent } from '../routes/otc-shop/shop-credit-rule/shop-credit-rule.component';
import { OtcShopOtcRuleLogComponent } from '../routes/otc-shop/otc-rule-log/otc-rule-log.component';
import { TemplateListComponent } from '../routes/otc-rule-template/template-list/template-list.component';
import { FansTeamSalesComponent } from '../routes/market-fans/market-fans-business-detail/fans-team-sales/fans-team-sales.component';
import { TriggerLoginComponent } from '../routes/market-trigger/trigger-login/trigger-login.component';
import { FansRedpackComponent } from '../routes/market-fans/market-fans-business-detail/fans-redpack/fans-redpack.component';
import { TriggerRecordListComponent } from '../routes/market-trigger/trigger-record-list/trigger-record-list.component';
const THIRDMODULES = [
  NgZorroAntdModule,
  CountdownModule,
  TransformModule
];
// endregion

// region: your componets & directives
const COMPONENTS = [
  PicViewerComponent,
  PicViewerModalComponent,
  SimpleEditorComponent,
  LeaveConfirmComponent,
  FullScreenEditorComponent,
  ConfirmComponent,
  AgentEditComponent,
  ConfirmComponent,
  BaseFormComponent,
  BaseInputComponent,
  BaseNumberInputComponent,
  BaseStringInputComponent,
  BaseArrayInputComponent,
  BaseJsonInputComponent,
  BaseImgInputComponent,
  BaseDateInputComponent,
  BaseJsonArrayInputComponent,
  AgentRechargeComponent,
  CakeOrderViewComponent,
  ProfitWithdrawListComponent,
  ProfitWithdrawEditComponent,
  CompanyIntegralViewComponent,
  FansProfitsComponent,
  InteractionModalComponent,
  OtcConvertListComponent,
  OtcShopListComponent,
  OtcCreditRecordComponent,
  OtcBillEditComponent,
  OtcConvertViewComponent,
  OtcShopEditComponent,
  OtcCusViewComponent,
  OtcCusShopComponent,
  OtcCusShopRoleComponent,
  OrderViewComponent,
  OrderListComponent,
  OtcShopBrandComponent,
  OtcShopOtcShopBrandEditComponent,
  OtcShopShopCreditRuleComponent,
  OtcShopOtcRuleLogComponent,
  TemplateListComponent,
  FansTeamSalesComponent,
  OtcCreditViewComponent,
  TriggerLoginComponent,
  TriggerRecordListComponent,
  FansRedpackComponent
];
const DIRECTIVES = [
  DragsortinstructDirective,
];
// endregion

@NgModule({
  imports: [
    CommonModule,
    FormsModule,
    RouterModule,
    ReactiveFormsModule,
    AlainThemeModule.forChild(),
    DelonABCModule,
    DelonACLModule,
    DelonFormModule,
    // third libs
    ...THIRDMODULES
  ],
  declarations: [
    // your components
    ...COMPONENTS,
    ...DIRECTIVES
  ],
  entryComponents: [
    ...COMPONENTS
  ],
  exports: [
    CommonModule,
    FormsModule,
    ReactiveFormsModule,
    RouterModule,
    AlainThemeModule,
    DelonABCModule,
    DelonACLModule,
    DelonFormModule,
    // third libs
    ...THIRDMODULES,
    // your components
    ...COMPONENTS,
    ...DIRECTIVES
  ],
  providers: [MyModalHelper]
})
export class SharedModule { }
